package com.gxa.meiye.admin.controller.lzj;


import com.gxa.meiye.admin.service.CommentService;
import com.gxa.meiye.core.common.ResponseData;
import com.gxa.meiye.core.pojo.domain.lzj.Comment;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(value = "评论表",tags = "评论表接口")
public class CommentController {

    @Autowired
    private CommentService commentService;
    @ResponseBody
    @GetMapping("/comment/query")
    public ResponseData queryAll(){
        return commentService.queryById();
    }

    //评价订单
    @ResponseBody
    @PostMapping("/comment/add")
    public ResponseData addComment(String ordernumber, String phone, Comment comment){
        return commentService.addCommen(ordernumber,phone,comment);
    }


}
